<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../back-common.jsp"%>
<%@ include file="/WEB-INF/pages/common/taglib.jsp"%>

<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>

<%
			Long offset = (Long)request.getAttribute("offset");
%>
    <form:form  action="${contextPath}/admin/system/mailLog/query" id="form1" method="get">
        <table class="${tableclass}" style="width: 100%">
		    <thead>
		    	<tr><th> <strong class="am-text-primary am-text-lg">系统管理</strong> /  邮件发送历史</th></tr>
		    </thead>
		    <tbody><tr><td>
		    	    <div align="left" style="padding: 3px">
				       	    <input type="hidden" id="curPageNO" name="curPageNO" value="${curPageNO}" />
				            &nbsp;用户名称：
				            <input type="text" name="receiveName" maxlength="50" value="${mailLog.receiveName}" class="${inputclass}" />
				            <input type="button" onclick="search()" value="搜索" class="${btnclass}" />
				      </div>
		     </td></tr></tbody>
	    </table>
    </form:form>
    <div align="center">
          <%@ include file="/WEB-INF/pages/common/messages.jsp"%>
		<display:table name="list" requestURI="/admin/system/mailLog/query" id="item" export="false" sort="external" class="${tableclass}" style="width:100%">
	    	<display:column title="顺序" class="orderwidth"><%=offset++%></display:column>
     		<display:column title="用户名称" property="receiveName"></display:column>
     		<display:column title="邮箱" property="receiveMail"></display:column>
     		<display:column title="邮箱ID" property="mailId"></display:column>
     		<display:column title="发送时间"><fmt:formatDate value="${item.sendTime}" type="both" dateStyle="long" pattern="yyyy-MM-dd HH:mm:ss" /></display:column>
     		<display:column title="发送状态" >
     			<c:if test="true">
     				<span style="color:green;">成功</span>
     			</c:if>
     			<c:if test="false">
	     			<span style="color:red;">失败</span>
     			</c:if>
     		</display:column>
	    </display:table>
        <ls:page pageSize="${pageSize }"  total="${total}" curPageNO="${curPageNO }"  type="default"/>
    </div>
        <script type="text/javascript">
			        function pager(curPageNO){
			            document.getElementById("curPageNO").value=curPageNO;
			            document.getElementById("form1").submit();
			        }
			        function search(){
					  	$("#form1 #curPageNO").val("1");//只要是搜索,都是从第一页开始查
					  	$("#form1")[0].submit();
					}
			//-->
		</script>


